<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%-- <%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%> --%>
<%-- <%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%> --%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%-- <%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags"%> --%>
<%@include file="/common/head.jsp" %>

    <!-- Content Header (Page header) -->
    <section class="content-header">
      <h1>
       支付管理 
        <small>支付列表</small>
      </h1>
      <!-- <ol class="breadcrumb">
        <li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li>
        <li><a href="#">Tables</a></li>
        <li class="active">Data tables</li>
      </ol> -->
    </section>

    <!-- Main content -->
    <section class="content">
      <div class="row">
        <div class="col-xs-12">
          <div class="box">
            <div class="box-header">
              <!-- <h3 class="box-title">Hover Data Table</h3> -->
            </div>
            <!-- /.box-header -->
            <div class="box-body">
					<div id="example2_wrapper"
						class="dataTables_wrapper form-inline dt-bootstrap">
						<div class="row">
							<div class="col-sm-6">
								<button class="btn btn-primary btn-sm" type="submit"><i class="fa fa-search"></i>&nbsp;查询</button>
								<!-- <button class="btn btn-primary btn-sm" type="submit"><i class="fa fa-search"></i>&nbsp;查询</button>
								<button class="btn btn-primary btn-sm" type="submit"><i class="fa fa-search"></i>&nbsp;查询</button> -->
							</div>
							<div class="col-sm-6"></div>
						</div>
						<div class="row">
							<div class="col-sm-12">
								<table data-toggle="table"
									class="table table-striped table-bordered" data-pagination="true">
									
									<thead>
										<tr>
											<th data-field="id">ID</th>
											<th data-field="type">支付方式</th>
											<th data-field="orderNo">订单号</th>
											<th data-field="status">支付状态</th>
											<th data-field="amount">支付金额</th>
											<th data-field="createtime">发起支付时间</th>
											<th data-field="responsetime">第三方响应时间</th>
										</tr>
									</thead>
									<tbody>
										<c:forEach items="${list }" var="n">
											<tr>
												<td>${n.id }</td>
												<td>
													${n.type eq 2 ? '支付宝' : '微信' }
												</td>
												<td>
													${n.orderNo }
												</td>
												<td>
													${n.status eq 0 ? '未支付' : '' }
													${n.status eq 1 ? '支付成功' : '' }
													${n.status eq 2 ? '支付失败' : '' }
												</td>
												<td>
													<fmt:formatNumber value="${n.amount }" type="currency" pattern="0.00"/>
												</td>
												<td>
													<fmt:formatDate value="${n.createTime }" pattern="yyyy-MM-dd HH:mm:ss"/>
												</td>
												<td>
													<fmt:formatDate value="${n.responseTime }" pattern="yyyy-MM-dd HH:mm:ss"/>
												</td>
											</tr>
										</c:forEach>
									</tbody>
								</table>
							</div>
						</div>
						<!-- <div class="row">
							<div class="col-sm-5">
								<div class="dataTables_info" id="example2_info" role="status"
									aria-live="polite">Showing 1 to 10 of 57 entries</div>
							</div>
							<div class="col-sm-7">
								<div class="dataTables_paginate paging_simple_numbers"
									id="example2_paginate">
									<ul class="pagination">
										<li class="paginate_button previous disabled"
											id="example2_previous"><a href="#"
											aria-controls="example2" data-dt-idx="0" tabindex="0">Previous</a></li>
										<li class="paginate_button active"><a href="#"
											aria-controls="example2" data-dt-idx="1" tabindex="0">1</a></li>
										<li class="paginate_button "><a href="#"
											aria-controls="example2" data-dt-idx="2" tabindex="0">2</a></li>
										<li class="paginate_button "><a href="#"
											aria-controls="example2" data-dt-idx="3" tabindex="0">3</a></li>
										<li class="paginate_button "><a href="#"
											aria-controls="example2" data-dt-idx="4" tabindex="0">4</a></li>
										<li class="paginate_button "><a href="#"
											aria-controls="example2" data-dt-idx="5" tabindex="0">5</a></li>
										<li class="paginate_button "><a href="#"
											aria-controls="example2" data-dt-idx="6" tabindex="0">6</a></li>
										<li class="paginate_button next" id="example2_next"><a
											href="#" aria-controls="example2" data-dt-idx="7"
											tabindex="0">Next</a></li>
									</ul>
								</div>
							</div>
						</div> -->
					</div>
				</div>
            <!-- /.box-body -->
          </div>
          <!-- /.box -->

          <!-- /.box -->
        </div>
        <!-- /.col -->
      </div>
      <!-- /.row -->
    </section>
    <!-- /.content -->


<%@include file="/common/foot.jsp" %>

<script>
function add() {
	parent.layer.open({
	    type: 2,
	    skin: 'layui-layer-rim', 
	    area: [layer_default_width, layer_default_height],
	    content: "http://www.baidu.com",
	    btn: ['确定', '取消'],
	    yes: function(index, layero){
	    	var detailForm = layer.getChildFrame('form', index);
	    	detailForm.ajaxSubmit({
			   	success: function(data) {
			   		if (isSuccess(data)) {
			   			layer.close(index);
			   			reload();
			   		} else {
			   		}
			   	}
		   });
	    }, cancel: function(index){
	        
	    }
	});	
}
</script>

</body>
</html>

